package com.fast.cms.model.article;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.fast.base.db.model.Commnent;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 文章评论表
 * @author Administrator
 */
@Entity
@Table(name = "T_dv_ArticleComment")
@DynamicInsert(true)
@DynamicUpdate(true)
public class ArticleComment implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name = "id", unique = true, nullable = false, length = 10)
    private int id;
    private int    commenterid;//评论人id
    private String commenter;//评论人
    private String email;//邮箱
    private String mobile;//手机号
    private String commentContent;//评论内容
    
    //对应文章ID
    @Column(name="article_uuid",length=64)
    private String articleUUID;
    
    private int    isView = 0;//是否显示 0显示 1不显示
    private String status;//状态
    
    // 操作信息
 	@Commnent("编辑人ID")
 	@Column(name="editor_id",length=11)
 	private int editorId = 0;// 编辑人Id
 	@Commnent("编辑人")
 	@Column(name="editor_name",length=32)
 	private String editorName = "";// 编辑人
 	@Commnent("编辑时间")
 	@Temporal(TemporalType.TIMESTAMP) 
 	@Column(name="edit_time")
 	private Date editTime;// 编辑时间
 	@Commnent("创建人ID")
 	@Column(name="creater_id",length=11)
 	private int createrId = 0;// 编辑人Id
 	@Commnent("创建人")
 	@Column(name="creater",length=32)
 	private String creater = "";// 编辑人
 	@Commnent("创建时间")
 	@Column(name="create_time",length=32)
 	@Temporal(TemporalType.TIMESTAMP) 
 	private Date createTime;
 	@Commnent("删除标识")
 	@Column(name="delete_flag",length=1)
 	private int deleteFlag = 0;//默认为不删除，1为删除
 	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getCommenterid() {
		return commenterid;
	}
	public void setCommenterid(int commenterid) {
		this.commenterid = commenterid;
	}
	public String getCommenter() {
		return commenter;
	}
	public void setCommenter(String commenter) {
		this.commenter = commenter;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	public String getCommentContent() {
		return commentContent;
	}
	public void setCommentContent(String commentContent) {
		this.commentContent = commentContent;
	}
	
	public int getIsView() {
		return isView;
	}
	public void setIsView(int isView) {
		this.isView = isView;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public int getEditorId() {
		return editorId;
	}
	public void setEditorId(int editorId) {
		this.editorId = editorId;
	}
	public String getEditorName() {
		return editorName;
	}
	public void setEditorName(String editorName) {
		this.editorName = editorName;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")  public Date getEditTime() {
		return editTime;
	}
	public void setEditTime(Date editTime) {
		this.editTime = editTime;
	}
	public int getCreaterId() {
		return createrId;
	}
	public void setCreaterId(int createrId) {
		this.createrId = createrId;
	}
	public String getCreater() {
		return creater;
	}
	public void setCreater(String creater) {
		this.creater = creater;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public int getDeleteFlag() {
		return deleteFlag;
	}
	public void setDeleteFlag(int deleteFlag) {
		this.deleteFlag = deleteFlag;
	}
}
